package com.ellricky.baselib.adapter.reserve;


import android.app.Activity;

import com.andr.common.ui.adapter.BaseRecyclerAdapter;
import com.andr.common.ui.adapter.SmartViewHolder;
import com.andr.common.util.EmptyUtil;
import com.andr.common.util.StrUtil;
import com.ellricky.baselib.R;
import com.ellricky.baselib.entity.reserve.CtReserveEntity;

public class CtReserveAdapter extends BaseRecyclerAdapter<CtReserveEntity> {

    private Activity context;

    public CtReserveAdapter(Activity context) {
        super(R.layout.base_adapter_common_list);
        this.context = context;
    }

    @Override
    protected void onBindViewHolder(SmartViewHolder vh, CtReserveEntity p1, int i) {

        String title = StrUtil.filterEmpty(p1.getName());
        String statusName = p1.getAppointStatusName();
        if (!EmptyUtil.isEmpty(statusName)) title += "（" + statusName + "）";
        vh.text(R.id.tvTitle, title);

        vh .text(R.id.tvKey, "");
        vh .text(R.id.tvValue, "");

        vh .text(R.id.tvDateKey, context.getString(R.string.base_order_time));
        vh .text(R.id.tvDate, p1.getAppointDate());
    }

}